The present invention relates in general to a communication network, and in particular, to storing compiled code between sessions accessing an application written in an interpreted programming language.
The worldwide network of computers, commonly known as the xe2x80x9cInternet,xe2x80x9d has seen explosive growth in the last several years. This growth has been typically fueled by the introduction and widespread use of xe2x80x9cwebxe2x80x9d browsers that allow for simple graphical user interface-based access to network servers. Such network servers typically support documents formatted as xe2x80x9cweb pages.xe2x80x9d The xe2x80x9cWorld Wide Webxe2x80x9d (www) is a collection of servers on the Internet that utilize the Hypertext Transfer Protocol (HTTP), a known application protocol that provides users access to files using a standard page description language referred to as HyperText Markup Language (HTML). It should be noted that files may be provided in different formats such as text, graphics, images, sound, and video, among others. HTML provides basic document formatting and allows a developer to specify xe2x80x9clinksxe2x80x9d to other servers and files. Use of an HTML-compliant client browser involves specification of a link via a Uniform Resource Locator, commonly known by the acronym, xe2x80x9cURL.xe2x80x9d Upon specification of a URL, a client may make a TCP/IP (Transmission Control Protocol/Internet Protocol) request to the server identified in the link and receive a xe2x80x9cweb pagexe2x80x9d in return, where the xe2x80x9cweb pagexe2x80x9d is a document formatted according to HTML.
FIG. 1 illustrates a communication network based on a client-server model typically utilized in the Internet. Conceptually, the Internet comprises a large network of xe2x80x9csitesxe2x80x9d 110 that are accessible by xe2x80x9cclientsxe2x80x9d 112. Each of the plurality of clients 112 is typically a user of a personal computer. Clients 112 access the Internet through some private Internet access provider 114 (such as Internet America(trademark)) or an on-line service provider 116 (such as America On-Line(trademark), Prodigy, Microsoft Network(trademark), and the like). Access provider 114 and service provider 116 will hereinafter be collectively referred to as the web servers. Furthermore, it should be noted that web servers may also be found at web sites. Alternatively, clients 112 may have a direct connection to each or a portion of the plurality of sites 110. Each of the clients 112 may run a xe2x80x9cbrowser,xe2x80x9d which is a known software tool used to access the sites 110 via the web servers (114 and 116). Each site 110 selectively operates a xe2x80x9cweb sitexe2x80x9d that supports files in the form of documents and pages. A network path to a server is identified by a uniform resource locator (URL) having a known syntax for defining a network connection. As previously mentioned, URLs may be utilized to specify a link from the user to another server or file. Upon specification of a link, one of the clients 112 makes a TCP/IP request using HTTP to one of the plurality of sites 110 identified in the link and receives a web page (generally, a document formatted according to HTML) in return. In some applications, web pages may also be formatted in dynamic HTML or XML. It should be noted that in some instances, a Java application may be executed without the use of a browser. Specifically, an applet viewer that runs independently of a browser may allow a user to actually view applets and similar Java applications across the Internet without having to use a browser.
In such a communication system, Java is a programming language that is often used to program applications made available on the Internet because Java is very flexible and may be easily used on any operating system, as long as that system implements a Java virtual machine. During execution of a Java-based application, a Java program is compiled into an architecture-neutral byte format that allows the application to be interpreted on any system platform that also implements the Java virtual machine.
It should be noted that the flexibility and neutrality of Java applications results from Java""s implementation as an xe2x80x9cinterpretedxe2x80x9d language. In interpreted programming languages, a compiler typically generates byte-codes to be used by a programming virtual machine, rather than native machine code, to provide control and data necessary to execute an application. More specifically, a Java compiler typically generates byte-codes to be used by a Java Virtual Machine (JVM), rather than native machine code, to provide the control and data signals necessary to execute a Java application. As previously mentioned, Java applications may be executed on any platform to which the JVM has been ported as such byte-codes are platform-independent. An advantage of the interpreted environment is that a standard xe2x80x9ccompilexe2x80x9d phase of program development is significantly diminished when viewed in contrast with the compile-link-run cycles required by programming languages such as C and C++.
In contrast, a disadvantage of interpreted programming languages, such as Java, is that that programming language is not executed as quickly as a compiled language, such as the C. To boost the performance of applications written in Java, many Java interpreters include xe2x80x9cJust In Timexe2x80x9d (JIT) compilers that are able to translate certain Java byte-code segments into machine code for a particular central processing unit at run-time. This block of compiled code (also referred to as JIT""ed code) is then stored in a storage space, referred to as a xe2x80x9cheap.xe2x80x9d Subsequently, when the Java application is closed or terminated, the compiled code stored in the xe2x80x9cheapxe2x80x9d is deleted. When the Java application is accessed again, the code must be re-compiled.
Thus, the advantages from JIT compilers are not readily observable after the Java application has been exited. Therefore, a need exists for a method and apparatus to efficiently use JIT compilers to reduce an amount of time required to execute a Java application, especially between sessions in which the Java application is accessed.
The previously mentioned needs are fulfilled with the present invention. Accordingly, there is provided, in a first form, a method for operating a communication network having a user data processor. The method includes the steps of retrieving an application and computing a first signature of the application. The method also includes the steps of comparing the first signature with the second signature previously stored in the first memory of the data processor and selectively compiling the selected portion of the application to generate compiled code when the first signature does not correspond to the second signature.
Additionally, there is provided, in a second form, a data processor in a communication network. The data processor includes an input device for retrieving an application and a first memory for storing a first signature along with the compiled code. The data processor also includes a central processing unit for computing a second signature using the application. The central processing unit compares the first signature with the second signature and selectively compiles the selected portion of the application to generate compiled code when the first signature does not correspond to the second signature.
Additionally, there is provided, in a third form, a method for operating a communication network comprising a user data processor. The method includes the step of retrieving a first signature. The first signature corresponds to an application. The method also includes the steps of comparing the first signature with a second signature previously stored in a first memory of the data processor and selectively retrieving the application when the first signature does not correspond to the second signature.
As well, there is provided, in a fourth form, a computer program executable by a machine to perform method steps for operating a communication network having a user data processor. The method steps include retrieving an application and computing a first signature of the application. The method steps also include comparing the first signature with the second signature previously stored in a first memory of the data processor and selectively compiling the selected portion of the application to generate a plurality of interpreted code when the first signature does not correspond to the second signature.
Additionally, there is provided, in a sixth form, a computer program executable by a machine to perform method steps for operating a communication network having a user data processor. The method steps include retrieving a first signature. The first signature corresponds to an application. The method steps also include comparing the first signature with a second signature previously stored in a first memory of the data processor and selectively retrieving the application when the first signature does not correspond to the second signature.